<?php
class pagination {
	var $CI;
	function __construct() {
		$this->CI =& get_instance();
	}

	public function get_pagination($url,$total_nums) {
		$this->CI->load->library('pagination');
		$config['base_url'] 			= $url;
		$config['total_rows'] 			= $total_nums;
		$config['page_query_string'] 	= TRUE;
		$config['num_links'] 			= $this->CI->config->item("page_num_links");
		$config['per_page'] 			= $this->CI->config->item("page_size");
		$config['first_link'] = '&lt;&lt;';
		$config['last_link'] = '&gt;&gt;';
		$config['cur_tag_open'] = '<li class="active"><a href="">';
		$config['cur_tag_close'] = '</a></li>';
		$config['num_tag_open'] = '<li>';
		$config['num_tag_close'] = '</li>';
		$config['first_tag_open'] = '<li>';
		$config['first_tag_close'] = '</li>';
		$config['last_tag_open'] = '<li>';
		$config['last_tag_close'] = '</li>';
		$config['next_tag_open'] = '<li>';
		$config['next_tag_close'] = '</li>';
		$config['prev_tag_open'] = '<li>';
		$config['prev_tag_close'] = '</li>';
		$this->CI->pagination->initialize($config);
		return $this->CI->pagination->create_links();

	}
}